# Read in data from DQYDJ website and CPS original data.
if (!require("ipumsr")) stop("Reading IPUMS data into R requires the ipumsr package. It can be installed using the following command: install.packages('ipumsr')")
library(wCorr)
library(tidyr)
library(dplyr)
library(janitor)
library(readr)
library(ggplot2)
library(DescTools)
path_data = "../data/"
setwd(path_data)
# Read in raw data.
# data_name <- "cps_00012.xml"
data_name <- "cps_margaret.xml"
# data_name <- "cps_00021.xml"
raw_2021 <- read_ipums_ddi(data_name) %>% read_ipums_micro
# Read in data from DQYDJ website and CPS original data.
if (!require("ipumsr")) stop("Reading IPUMS data into R requires the ipumsr package. It can be installed using the following command: install.packages('ipumsr')")
library(wCorr)
library(tidyr)
library(dplyr)
library(janitor)
library(readr)
library(ggplot2)
library(DescTools)
path_data = "../data/"
setwd(path_data)
# Read in raw data.
# data_name <- "cps_00012.xml"
# data_name <- "cps_00021.xml"
data_name <- "cps_margaret.xml"
file_path <- paste0(path_data, data_name)
raw_2021 <- read_ipums_ddi(file_path) %>% read_ipums_micro
read_ipums_ddi(file_path)
?read_ipums_micro
data_name <- "cps_00021.xml"
file_path <- paste0(path_data, data_name)
raw_2021 <- read_ipums_ddi(file_path) %>% read_ipums_micro
